#ifndef KERNELAPI_H_INCLUDED
#define KERNELAPI_H_INCLUDED

#include <stdio.h>
#include <UserAPI.h>

#include <ST_Schelduller.h>
#include <vfsystem.h>


typedef enum err_Kern{
KERNEL_STATUS_OK                    =0,
KERNEL_NOT_CREATED                  =1,
KERNEL_EMPTY_USER_DATA_SENDING      =5,
KERNEL_SCHELD_INITIATION_PROBLEMS  =10,
KERNEL_NOT_ACCEPTED                =15,
KERNEL_FUNCTION_NOT_ACCEPTED       =20,
KERNEL_WRONG_PERIOD                =25,
KERNEL_TASK_CREATION_PROBLEMS      =30,
KERNEL_TASK_INSTERTION_PROBLEMS    =40,
KERNEL_DEBUG_OPENFILE_PROBLEMS     =50,
KERNEL_ISERTION_PROBLEMS           =100
}err_Kern;


typedef struct Kernel Kern;/*implementation in STChelduler.c*/



extern Kern* kern;

int DRIVER(void);
/***********************************************8/
DRIVER_read(IOReq* _IO,size_t _size, char* _buffer)
/*System call*/
int openfile(char* name);
/*boot process*/
err_Kern Kernel_boot();
/*initillizing data for Kernenle work*/
err_Kern Kernel_initdata(var_t** data1);
/*Running of shchelduler*/
err_Kern Kern_RunSchel();
/*Destroy Kernel*/
int Kern_Shutdown();
/*Function to add task, period has to be  proveded in msec MIN1
MAX 10 msec, returns error*/
err_Kern Kernel_SchelduleEvery(func Taskfunc,size_t periond,void* data);
/*Get Schelduler*************************************/
#endif /* KERNELAPI_H_INCLUDED*/
